From: emellor@ewan Date: Tue, 27 Sep 2005 21:05:03 +0000 (+0100) Subject: Added getDeviceSxprs, to support xm block-list. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16769^2~16^2~29 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=e33f948908b1fae73343c2ec92fa0c58ea2b09ca;p=xen.git Added getDeviceSxprs, to support xm block-list. --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index e2148f9f9a..21d365591c 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -734,13 +734,6 @@ class XendDomainInfo: __repr__ = __str__ - def getDeviceController(self, name): - if name not in controllerClasses: - raise XendError("unknown device type: " + str(name)) - - return controllerClasses[name](self) - - def createDevice(self, deviceClass, devconfig): return self.getDeviceController(deviceClass).createDevice(devconfig) @@ -754,6 +747,21 @@ class XendDomainInfo: return self.getDeviceController(deviceClass).destroyDevice(devid) + def getDeviceSxprs(self, deviceClass): + return self.getDeviceController(deviceClass).sxprs() + + + ## private: + + def getDeviceController(self, name): + if name not in controllerClasses: + raise XendError("unknown device type: " + str(name)) + + return controllerClasses[name](self) + + + ## public: + def sxpr(self): sxpr = ['domain', ['domid', self.domid],